<?php

namespace Database\Factories;

use App\Models\Message;
use Illuminate\Database\Eloquent\Factories\Factory;

class MessageFactory extends Factory
{
    protected $model = Message::class;

    public function definition()
    {
        return [
            'user_id' => $this->faker->numberBetween(1, 10), // 随机用户 ID
            'title' => $this->faker->sentence(5), // 随机生成 5 个单词左右的留言标题
            'content' => $this->faker->paragraph(3), // 随机生成包含 3 个句子左右的留言内容
            'message_time' => $this->faker->dateTimeBetween, // 随机生成时间
        ];
    }
}